using System;
using System.Collections.Generic;
using System.Text;

namespace TTXNA.src.Util
{
    class Util
    {

    public static Direction Combine(Direction dir1, Direction dir2)
        {
            List<Direction> list = new List<Direction>();
            list.Add(dir1);
            list.Add(dir2);

            if (list.Contains(Direction.NE) && list.Contains(Direction.SE))
            {
                return Direction.EW;
            }
            else if (list.Contains(Direction.SE) && list.Contains(Direction.SW))
            {
                return Direction.NS;
            }
            else if (list.Contains(Direction.SW) && list.Contains(Direction.NW))
            {
                return Direction.EW;
            }
            else if (list.Contains(Direction.NW) && list.Contains(Direction.NE))
            {
                return Direction.NS;
            }

            return Direction.None;
        }

}

}
